/************************************* * File: Rectangle.cpp * Author: Katherine Gibson * Date: 2/16/2016 * Section: N/A * E-mail: k38@umbc.edu * Description: * This file contains the * declaration for a rectangle class *************************************/ // need to include these so string works using namespace std; #include class Rectangle { public: /*************************************/ /* attributes of the Rectangle class */ /*************************************/ int m_width; int m_height; string m_color; /**********************************/ /* methods of the Rectangle class */ /**********************************/ //------------------------------------------------------- // Name: CalcArea // Pre: m_width and m_height have been initialized // Post: returns the calculated area of the Rectangle //--------------------------------------------------------- int CalcArea(void); //------------------------------------------------------- // Name: CalcPerim // Pre: m_width and m_height have been initialized // Post: returns the calculated perimeter of the Rectangle //--------------------------------------------------------- int CalcPerim(void); //------------------------------------------------------- // Name: Rotate // Pre: m_width and m_height have been initialized // Post: switches m_width and m_height to "rotate" the Rectangle //--------------------------------------------------------- void Rotate(); //------------------------------------------------------- // Name: IsSquare // Pre: m_width and m_height have been initialized // Post: returns true if m_width and m_height are equal //--------------------------------------------------------- bool IsSquare(); };